package com.hmkj.core.constant;

/**
 * 常量类
 * @author Mr.
 * @date 2017/5/22
 */
public final class Constant {
    /** session名称*/
    public static final String WIN_SESSION = "win_session";
    /** 注册短信验证码 */
    public static final String REGISTER_CODE = "registerCode";
    /**手机号码忘记密码验证码key**/
    public static final String PHONE_VERIFICATION_CODE = "BIZ:PHONE:VERIFICATION:CODE:";
    /**手机号码注册验证码key**/
    public static final String PHONE_REGIST_CODE = "BIZ:PHONE:PHONE_REGIST_CODE:CODE:";
    /** 找回密码短信验证码 */
    public static final String FORGET_PWD_CODE = "forgetPwdCode";
    /** 类型 - 信息*/
    public static final Integer TYPE_MESSAGE = 2;
    /** 递延费不足提醒短信 */
    public static final String DIYAN_MSG = "diyanMsg";

    /** 用户待递延订单列表缓存前缀 */
    public static final String PREFIX_USER_WAIT_DEFER_ORDERS = "order:waitDefer:";
    /**
     * 分页数据默认第一页
     */
    public static final int PAGE_ONE = 1;

    /**
     * 分页大小
     */
    public static final int PAGE_SIZE = 10;
    /**行情前缀 **/
    public static final String QUOTE_PREFIX = "QUOTE:PRICE:";
    /** 日K 前缀**/
    public static final String QUOTE_KLINE_PREFIX = "QUOTE:KLINE:";
    /** 分时 前缀**/
    public static final String TIME_LINE_PREFIX = "QUOTE:TLINE:PREFIX:";
    /** 上证股票A股信息前缀**/
    public static final String UP_STOCK_PREFIX = "QUOTE:UP:STPCK:PREFIX:";
    /** 深证股票A股信息前缀**/
    public static final String SHEN_STOCK_PREFIX = "QUOTE:SHEN:STPCK:PREFIX:";
    /** 上证股票信息前缀**/
    public static final String UPINDEX_STOCK_PREFIX = "QUOTE:UPINDEX:STPCK:PREFIX:";
    /** 深证股票信息前缀**/
    public static final String SHENINDEX_STOCK_PREFIX = "QUOTE:SHENINDEX:STPCK:PREFIX:";
    /** 中小板股票信息前缀**/
    public static final String MS_STOCK_PREFIX = "QUOTE:MS:STPCK:PREFIX:";
    /** 创业板股票信息前缀**/
    public static final String STARTUPS_STOCK_PREFIX = "QUOTE:STARTUPS:STPCK:PREFIX:";
    /** 股票列表信息前缀**/
    public static final String STOCK_LIST_PREFIX = "QUOTE:STOCK:LIST:PREFIX:";
    /** 自选前缀 排序字段**/
    public static final String MY_CHOOSE_PREFIX = "MYCHOOSE:SORT:PREFXI:";
    /** pc登录用户 前缀**/
    public static final String LOGIN_USER_PREFIX = "BIZ:USER:LOGIN:PREFIX:";
    /** pc 图形验证码 前缀**/
    public static final String WEB_YZM_PREFIX = "BIZ:WEB:YZM:PREFIX:";
    /** 月排名 前缀**/
    public static final String SIMULATION_RANK_PREFIX = "BIZ:SIMULATION:RANK:PREFIX:";
    /**
     * 验证码 测试/正式环境 类型 枚举
     * @author zhang yuan
     */
    public enum ValidateTest {
        REAL("0", "真实验证码"),
        ALL("1", "万能验证码");

        private String Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getValue() {
            return Value;
        }

        public void setValue(String value) {
            Value = value;
        }

        ValidateTest(String Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     * 审核状态 1 待审核 2 通过 3 不通过
     * @author zhang yuan
     */
    public enum Status {
        AUDIT(1, "待审核"),
        PASS(2, "通过"),
        UNPASS(3, "不通过"),
        DEALING(4,"处理中");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        Status(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     * 是否删除 0:否 1 是
     * @author zhang yuan
     */
    public enum DEL_FLAG {
        NO(0, "否"),
        YES(1, "是");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        DEL_FLAG(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     * 手续费承担方 1 平台 2 用户
     * @author zhang yuan
     */
    public enum BEAR_PARTY {
        PLAT(1, "平台"),
        USER(2, "用户");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        BEAR_PARTY(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }

    /**
     * 添加银行卡结果 类型 枚举
     *
     * @author zhang yuan
     *
     */
    public enum AddBankResult {
        SUCCESS(1, "添加银行卡成功"),
        INFO_NOT_MATCH(2, "认证信息不匹配,请修改并重新提交"),
        CHECK_FAILED(3,"校验失败,请重新提交"),
        TYPE_NOT_MATCH(4,"银行卡类型不匹配"),
        SYSTEM_BUSY(5,"系统繁忙,请稍后再试"),
        WRONG_CARD_NO(6,"不是正确的卡号"),
        NO_EXIST(7,"暂无此银行卡记录");


        private int Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getValue() {
            return Value;
        }

        public void setValue(int value) {
            Value = value;
        }

        AddBankResult(int Value, String name) {
            this.Value = Value;
            this.name = name;
        }

        public static String getNameByValue(int value) {
            for (AddBankResult a : AddBankResult.values()) {
                if (a.getValue() == value) {
                    return a.getName();
                }
            }
            return null;
        }
    }

    /**
     *  资金变动类型 1:充值2:提现3:收入4:支出
     * @author zhang yuan
     */
    public enum ACCOUNT_TYPE {
        RECHARGE(1, "充值"),
        CASH(2, "提现"),
        IN(3,"收入"),
        OUT(4,"支出"),
        CASH_FEE(5,"提现手续费"),
        DEAL_FEE(6,"结算手续费"),
        BUY(7, "买入"),
        FREEZE(8,"提现冻结"),
        UNFREEZE(9,"提现解冻"),
        LVYUE(10,"冻结履约保证金"),
        ZONGHE(11,"扣除综合管理费"),
        DIYAN(12,"递延费"),
        ZHIYING(13,"冻结止盈保证金"),
        UFREEZE(14,"解冻"),
        INCOME(15,"收益"),
        LOSS(16,"亏损"),
        UNPAID(17,"扣除未支付的递延费"),
        SELLERFEE(18,"销售佣金"),
        MANAGEFEE(19,"收取综合管理费"),
        REPAIRLOSS(20,"补亏"),
        POUNDAGEFEE(21,"手续费佣金"),
        PROFITFEE(22,"盈利佣金"),
        FEECOST(23,"综合费用成本"),
        PLANTDIYAN(24,"平台收取递延费");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        ACCOUNT_TYPE(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     *  订单类型 1:正常2:体验
     * @author zhang yuan
     */
    public enum ORDER_TYPE {
        NORMAL(1, "正常订单"),
        EXPERIENCE(2, "体验订单");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        ORDER_TYPE(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     *  平仓类型 1:手动平仓2:止损平仓3:递延费不足平仓 4:强制平仓
     * @author zhang yuan
     */
    public enum ClosePositionType {
        HANDLE(1, "手动平仓"),
        STOP_LOSS(2, "止损平仓"),
        DEFER_MONEY_INSUFFICIENT(3,"递延费不足平仓"),
        FORCE(4,"强制平仓"),
        TRIGGER_DEFER(5,"触发递延条件平仓");


        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        ClosePositionType(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     *  订单类型 1:正常2:体验
     * @author zhang yuan
     */
    public enum IS_TOP {
        YES(1, "置顶"),
        NO(0, "不置顶");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        IS_TOP(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     *  公告状态1：未发布  2:已发布
     * @author zhang yuan
     */
    public enum NOTICE_STATUS {
        UNPUBLISH(1, "未发布"),
        PUBLISH(2, "已发布");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        NOTICE_STATUS(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     *  股票状态0，正常 ，1停盘 ，2暂时停盘 ，3，ST股 ，4非交易时段,5, 风险股,6:涨跌幅超过百分之八
     * @author zhang yuan
     */
    public enum STOCK_STATUS {
        ST("3", "ST股"),
        NOT_TRADE_TIME("4", "非交易时段"),
        DANGER_STOCK("5", "风险股"),
        OVER_EIGHT("6","涨跌幅超过百分之八");

        private String Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getValue() {
            return Value;
        }

        public void setValue(String value) {
            Value = value;
        }

        STOCK_STATUS(String Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     * 是否显示
     * @author zhang yuan
     */
    public enum IS_SHOW {
        YES(1, "显示"),
        NO(0, "不显示");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        IS_SHOW(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     * 冻结状态
     * @author zhang yuan
     */
    public enum FREEZE_STATUS {
        YES(1, "冻结"),
        NO(0, "未冻结");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        FREEZE_STATUS(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
    /**
     * 订阅状态
     * @author zhang yuan
     */
    public enum SUBSCRIBE_STATUS {
        YES(1, "是"),
        NO(0, "否");

        private Integer Value;
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getValue() {
            return Value;
        }

        public void setValue(Integer value) {
            Value = value;
        }

        SUBSCRIBE_STATUS(Integer Value, String name) {
            this.Value = Value;
            this.name = name;
        }
    }
}
